package day0803;

import java.util.Arrays;
import java.util.Random;

public class sorting1 {
    public static void main(String[] args) {
        System.out.println(Arrays.toString(method()));

    }

    public static int[] method() {
        int[] a={77,25,12,36,99,78};
        Integer x=new Random().nextInt(a.length-1);
        Integer y=new Random().nextInt(a.length-1);
        while(true){
            int t;
            if (a[x]>a[y]){
                t=a[x];
                a[x]=a[y];
                a[y]=t;
            }
            for (int i = 0; i < a.length-1; i++) {
                if (a[i]<=a[i+1]);
                continue;
            }
            return a;
        }

    }
}
